package cn.tedu.pic.controller;

import cn.HK.vo.PicUploadResult;
import cn.tedu.pic.service.PicService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;

@RestController
public class PicController {
    /*
        图片上传
        请求地址:/emp/pic
        请求参数:MultipartFile pic
        返回参数:PicUploadResult
     */


    @Autowired(required = false)
    private PicService picService;

    @RequestMapping("/emp/pic")
    public PicUploadResult picUpload(MultipartFile pic){
        return picService.picUpload(pic);

    }
}
